package com.example.myspringframework.core.convert.support;

import com.example.myspringframework.core.convert.converter.Converter;
import com.example.myspringframework.core.convert.converter.ConverterFactory;

/**
 * 字符串转数字类型的转换器工厂（感觉多此一举，不如直接实现Converter转换器接口）
 */
public class StringToNumberConverterFactory implements ConverterFactory<String, Number> {
    @Override
    public <T extends Number> Converter<String, T> getConverter(Class<T> targetType) {
        return new StringToNumberConverter<>(targetType);
    }
}
